package com.mi.mapper;

import com.mi.entity.MyPages;
import com.mi.entity.NewsEntity;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface NewsMapper {


    //根据分类n_category条件查询新闻列表
    public List<NewsEntity> queryNewsMapper(NewsEntity ne);

    //根据新闻名模糊查询
    public List<NewsEntity> fuzzyQuery(NewsEntity ne);

    /**
     * 根据条件查找
     * @param ne
     * @return
     */
    public List<NewsEntity> queryNews(NewsEntity ne);

    //新闻ID 查询新闻详情
    public NewsEntity queryNewsDetails(@Param("n_id") int n_id);

    /**
     * 添加新闻
     * @param newsEntity
     * @return
     */
    public boolean addNews(NewsEntity newsEntity);

    /**
     * 删除新闻
     * @param n_id
     * @return
     */
    public boolean delNews(@Param("n_id") String[] n_id);

    /**
     * 修改新闻状态
     * @param newsEntity
     * @return
     */
    public boolean updNewsStatus(NewsEntity newsEntity);

}
